package ailibaba.number1;

/**
 * @Author Jun jie Yi
 * @Date 2022/3/16 14:27
 */
public class Demo {
    public static void main(String[] args) {

        int[] a = {3, 2, 5, 7, 3, 10};

    }

    public static int getMax(int[] a) {
        int[] flag = new int[a.length];
        int max = 0;
        for (int i = 0; i < a.length; i++) {
            if (flag[i] == 1) continue;
            int f = a[i], sum = 1;
            flag[i] = 1;
            for (int j = i + 1; j < a.length; j++) {
                if (a[j] > f) {
                    sum++;
                    f = a[j];
                    flag[j] = 1;
                }
            }
            if (max < sum) max = sum;
        }
        return max;
    }

}
